//
//  RTJUserInfoCommntCell.m
//  RuiTaiJinProject
//
//  Created by jayson on 2018/12/5.
//  Copyright © 2018年 leewei. All rights reserved.
//

#import "RTJUserInfoCommntCell.h"

@implementation RTJUserInfoCommntCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    [self backview:_bg_view1 viewOfcornerRadius:5];
    [self backview:_bg_view viewOfcornerRadius:5];
    [self backview:_bg_view2 viewOfcornerRadius:5];
    [self backview:_bg_view3 viewOfcornerRadius:5];
    [self backview:_bg_view4 viewOfcornerRadius:5];
    [self backview:_bg_view5 viewOfcornerRadius:5];
    [self backview:_bg_view6 viewOfcornerRadius:5];
    [self backview:_bg_view7 viewOfcornerRadius:5];

}

-(void)backview:(UIView *)backview viewOfcornerRadius:(NSInteger)cornerRadius{
    
    backview.layer.cornerRadius = cornerRadius;
    backview.layer.shadowColor = [UIColor colorForHex:@"#dbc9cc"].CGColor;
    backview.layer.shadowOffset = CGSizeMake(-1, 1);
    backview.layer.shadowOpacity = 0.5;
    backview.layer.shadowRadius = 5;
    
}

-(void)setData:(NSDictionary *)data{
    
    if (_data!= data) {
        _data = data;
        
        NSString *  urlString= [NSString stringWithFormat:@"%@",_data[@"icon"]];
        NSString* encodedString = [urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];

        [_bankImg  sd_setImageWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@", encodedString]] placeholderImage:nil];
        _bankName.text = _data[@"name"];
        
    }
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
